Side Length of a Regular n-gon

n-gon.png
Figure 1: n-gon. Here n=7. The figure was drawn using Geogebra with the following command: Sequence((cos((2k2)π/n),sin((2k2)π/n)),k,1,n) which produced the points. The segments were then added to join the points.

I want to derive a side length for a regular n-gon inscribed in a unit circle. So, starting with n=3, I assigned the first point to (1,0) and going counter clockwise, let the next 2 points be (cos(2π3),sin(2π3)) and (cos(4π3),sin(4π3)) respectively. After a few repetitions of this with other values of n, I found that the vertices of this particular n-gon were at Pn=(cos((2k2)πn),sin((2k2)πn)),k=1,2,...n.

To get the side length, I use the distance formula and compute P2P1. That resulted in the following algebra: [cos((222)πn)cos((212)πn)]2+[sin((222)πn)sin((212)πn)]2 [(cos(2πn)1)2+sin2(2πn)]1/2 [cos2(2πn)2cos(2πn)+1+sin2(2πn)]1/2 substitute 1sin2(2πn)=cos2(2πn) [1sin2(2πn)2cos(2πn)+1+sin2(2πn)]1/2 sidelength=[22cos(2πn)]1/2
Now use the identity cos(2θ)=12sin2(θ) to get =[22(12sin2(πn))]1/2 [22+4sin2(πn)]1/2 =4sin2(πn) side length=2sin(πn) To get the side length when the radius is different from 1, we just need Side Length=R2sin(πn)